package com.xibei.homepage.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang.StringUtils;

/**
 * 创建用户，根据entity内容，请求只需要name,email
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CreateUserRequest {

    private String username;
    private String email;

    /**
     * 请求有效性检验
     * @return
     */
    public boolean validate()
    {
        return StringUtils.isNotEmpty(username)&&StringUtils.isNotEmpty(email);
    }
}
